import 'package:bilibili/model/home_mo.dart';
import 'package:bilibili/widget/video_view.dart';

import 'package:flutter/material.dart';

class VideoDetailPage extends StatefulWidget {
  final VideoMo? videoMo;
  const VideoDetailPage({super.key, this.videoMo});

  @override
  State<VideoDetailPage> createState() => _VideoDetailPageState();
}

class _VideoDetailPageState extends State<VideoDetailPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(),
        body: Column(
          children: [Text('标题：${widget.videoMo?.title ?? ""}'), _viewView()],
        ));
  }

  _viewView() {
    var model = widget.videoMo;
    return VideoView(
      url: model?.url ?? "",
      cover: model?.cover ?? "",
    );
  }
}
